package com.laamella.syntherface.synths.alesis.micron.gui;

import com.laamella.syntherface.synths.alesis.micron.model.Voice;

@SuppressWarnings("serial") public class SyncPanel extends javax.swing.JPanel {

	/** Creates new form SyncPanel */
	public SyncPanel() {
		initComponents();
	}

	public void setModel(Voice voice) {
		syncTypeButtonGroup.setModel(voice.oscillatorSyncTypeDerived);
		syncHardButtonGroup.setModel(voice.oscillatorSyncHardDerived);
	}

	/**
	 * This method is called from within the constructor to initialize the
	 * form. WARNING: Do NOT modify this code. The content of this method is
	 * always regenerated by the Form Editor.
	 */
	@SuppressWarnings("unchecked")// <editor-fold defaultstate="collapsed"
					// desc="Generated
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        syncTypeButtonGroup = new com.laamella.syntherface.synths.gui.RotaryButtonGroup();
        syncHardButtonGroup = new com.laamella.syntherface.synths.gui.RotaryButtonGroup();
        _2to1Button = new javax.swing.JRadioButton();
        _2plus3to1Button = new javax.swing.JRadioButton();
        offButton = new javax.swing.JRadioButton();
        hardButton = new javax.swing.JRadioButton();
        softButton = new javax.swing.JRadioButton();
        jLabel1 = new javax.swing.JLabel();

        setBackground(new java.awt.Color(255, 153, 102));
        setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0), 3));
        setLayout(null);

        syncTypeButtonGroup.add(_2to1Button);
        _2to1Button.setText("<html>2 &rarr; 1</html>");
        _2to1Button.setOpaque(false);
        add(_2to1Button);
        _2to1Button.setBounds(70, 40, 70, 23);

        syncTypeButtonGroup.add(_2plus3to1Button);
        _2plus3to1Button.setText("<html>2+3 &rarr; 1</html>");
        _2plus3to1Button.setOpaque(false);
        add(_2plus3to1Button);
        _2plus3to1Button.setBounds(70, 60, 70, 23);

        syncHardButtonGroup.add(offButton);
        offButton.setText("off");
        offButton.setOpaque(false);
        add(offButton);
        offButton.setBounds(10, 30, 39, 23);

        syncHardButtonGroup.add(hardButton);
        hardButton.setText("hard");
        hardButton.setOpaque(false);
        add(hardButton);
        hardButton.setBounds(10, 50, 90, 23);

        syncHardButtonGroup.add(softButton);
        softButton.setText("soft");
        softButton.setOpaque(false);
        add(softButton);
        softButton.setBounds(10, 70, 93, 23);

        jLabel1.setFont(new java.awt.Font("Tahoma", 1, 18));
        jLabel1.setText("SYNC");
        add(jLabel1);
        jLabel1.setBounds(10, 10, 90, 22);
    }// </editor-fold>//GEN-END:initComponents

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JRadioButton _2plus3to1Button;
    private javax.swing.JRadioButton _2to1Button;
    private javax.swing.JRadioButton hardButton;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JRadioButton offButton;
    private javax.swing.JRadioButton softButton;
    private com.laamella.syntherface.synths.gui.RotaryButtonGroup syncHardButtonGroup;
    private com.laamella.syntherface.synths.gui.RotaryButtonGroup syncTypeButtonGroup;
    // End of variables declaration//GEN-END:variables

}
